function myBombBoxTwo (indexType, indexName, winName, frameName) {

//alert(indexType+"||"+indexName)
  if (indexType == 1) {

    if (indexName == '请选择,') {
      indexName = [
        1980,
        01];

    }

    // indexName=[1980,'1','1'];
    //
    var arrayy = [
      {
        tag: '年',
        scope: '1900-2018'
      },
      {
        tag: '月',
        scope: '1-12'
      },
      {
        tag: '日',
        scope: '1-31'
      }];

    var arrayy = [
      {
        tag: '年',
        scope: '1900-2018'
      },
      {
        tag: '月',
        scope: '1-12'
      },
      {
        tag: '日',
        scope: '1-31'
      }];
    var data = {
      arrayy: arrayy,
      title: '',
      indexType: indexType,
      selected: indexName, //默认选中的值
      winName: winName,
      frameName: frameName,
      two: true
    };

    openFrameeeTwo(data);
    return;

  }

}

function openFrameeeTwo (data) {

  api.openFrame({
    name: 'actionsheet1',
    url: '../../html/main5/actionsheet1.html',
    rect: {
      x: 0,
      y: 0,
      w: 'auto',
      h: 'auto'
    },
    pageParam: data
  });

}

//main5所在城市,黄色按钮
function CityList (index) {
  //个人基本信息
  if (index == 1) {
    var data = {
      winName: 'edit_address_win',
      frameName: 'edit_address_frm', //			title:$api.byId('diqu').value,
      index: index
    };
  }
  if (index == 2) {
    var data = {
      winName: 'my_information_win',
      frameName: 'my_information_frm', //			title:$api.byId('diqu').value,
      index: index
    };
  }

  setTimeout(function () {
    api.openFrame({
      name: 'slidinglistcity',
      url: '../../html/slidinglistcity.html',
      rect: {
        x: 0,
        y: 0,
        w: 'auto',
        h: api.winHeight
      },
      pageParam: data
    });
  }, 200);
}

//城市mian1绿色按钮
function CityListtt (index) {
  //装修报价
  if (index == 1) {
    var data = {
      winName: 'add_address_win',
      frameName: 'add_address_frm', //			title:$api.byId('diqu').value,
      index: index
    };
  } else if (index == 2) {
    var data = {
      winName: 'baojia_set_win',
      frameName: 'baojia_set_frm1', //			title:$api.byId('diqu').value,
      index: index
    };
  }

  setTimeout(function () {
    api.openFrame({
      name: 'slidinglistcity',
      url: '../../html/slidinglistcity1.html',
      rect: {
        x: 0,
        y: 0,
        w: 'auto',
        h: api.winHeight
      },
      pageParam: data
    });
  }, 200);
}

function myBombBoxById_11 (indexType, indexName, winName, frameName, valueId, other) {
//	alert(111);
  console.log(indexType + '||' + indexName + '||' + winName + '||' + frameName + '||' + valueId);
//	alert(indexType+"||"+indexName+"||"+ winName+"||"+ frameName+"||"+valueId);
//年龄
  if (indexType == 1) {
    if (indexName == '') {
      indexName = '星期一';
    }
    var arrayy = [
      '星期日',
      '星期一',
      '星期三'];
    var data = {
      arrayy: arrayy,
      title: '',
      indexType: indexType,
      selected: indexName, //默认选中的值
      winName: winName,
      frameName: frameName
    };

    openFrameee1(data);
    return;

  } else if (indexType == 2) {
    if (indexName == '') {
      indexName = '第3周';
    }
    var arrayy = [
      '第1周',
      '第2周',
      '第3周',
      '第4周',
      '第5周',
      '第6周',
      '第7周',
      '第8周',
      '第9周',
      '第10周',
      '第11周',
      '第12周',
      '第13周',
      '第14周',
      '第15周',
      '第16周',
      '第17周',
      '第18周',
      '第19周',
      '第20周',
      '第21周',
      '第22周',
      '第23周',
      '第24周',
      '第25周'];
    var data = {
      arrayy: arrayy,
      title: '',
      indexType: indexType,
      selected: indexName, //默认选中的值
      winName: winName,
      frameName: frameName
    };

    openFrameee1(data);
    return;

  } else if (indexType == 3) {
    if (indexName == '') {
      indexName = '提前半小时';
    }
    var arrayy = [
      '关闭',
      '提前半小时',
      '提前1小时',
      '提前2小时',
      '提前3小时',
      '提前1天',
      '提前3天',
      '提前5天',
      '提前7天'];
    var data = {
      arrayy: arrayy,
      title: '',
      indexType: indexType,
      selected: indexName, //默认选中的值
      winName: winName,
      frameName: frameName
    };

    openFrameee2(data);
    return;

  } else if (indexType == 4) {
    if (indexName == '') {
      indexName = '本科';
    }
    var arrayy = [
      '本科',
      '硕士',
      '博士'];
    var data = {
      arrayy: arrayy,
      title: '',
      indexType: indexType,
      selected: indexName, //默认选中的值
      winName: winName,
      frameName: frameName
    };

    openFrameee2(data);
    return;

  } else if (indexType == 5) {
    if (indexName == '') {
      indexName = '男';
    }
    var arrayy = [
      '男',
      '女'];
    var data = {
      arrayy: arrayy,
      title: '',
      indexType: indexType,
      selected: indexName, //默认选中的值
      winName: winName,
      frameName: frameName
    };

    openFrameee2(data);
    return;

  } else if (indexType == '6') {

// indexName=['1980年','1月','1日'];
//
// var arrayy = [{
// 	tag : '年',
// 	scope: '1900-2018'
// }, {
// 	tag : '月',
// 	scope:'1-12'
// },{
// 	tag : '日',
// 	scope:'1-31'
// }]

    var date = new Date;
    var year = date.getFullYear();

    function fnYear () {
      var yearArr = [];
      for (var i = year - 100; i < year + 1; i++) {
        yearArr.push(i + '年');
      }
      return yearArr;
    }

    function fnMonth () {
      var yueArr = [];
      for (var i = 1; i < 13; i++) {
        yueArr.push(i + '月');
      }
      return yueArr;
    }

    var dayLength = 32;

    function fnDay () {
      var DayArr = [];
      for (var i = 1; i < dayLength; i++) {
        DayArr.push(i + '日');
      }
      return DayArr;
    }

    var arrayy = [
      {
        // tag : '年',
        scope: fnYear()
      },
      {
        // tag : '月',
        scope: fnMonth()
      },
      {
        // tag : '月',
        scope: fnDay()
      }];
    var data = {
      arrayy: arrayy,
      title: '',
      indexType: indexType,
      selected: indexName, //默认选中的值
      winName: winName,
      frameName: frameName,
      two: true
    };

    openFrameeeTwo(data);
    return;

  } else if (indexType == 7) {
    if (indexName == '') {
      indexName = '本科';
    }
    var arrayy = [
      '本科',
      '硕士',
      '博士'];
    var data = {
      arrayy: arrayy,
      title: '',
      indexType: indexType,
      selected: indexName, //默认选中的值
      winName: winName,
      frameName: frameName
    };

    openFrameee3(data);
    return;

  } else if (indexType == '8') {

    // var date = new Date;
    // var year = date.getFullYear();

    // function fnYear () {
    //   var yearArr = [];
    //   for (var i = year - 100; i < year + 1; i++) {
    //     yearArr.push(i + '年');
    //   }
    //   return yearArr;
    // }

    function fnMonth () {
      var yueArr = [];
      for (var i = 1; i < 13; i++) {
        yueArr.push(i + '月');
      }
      return yueArr;
    }

    var dayLength = 32;

    function fnDay () {
      var DayArr = [];
      for (var i = 1; i < dayLength; i++) {
        DayArr.push(i + '号');
      }
      return DayArr;
    }

    function fnHour () {

      var HourArr = [];
      for (var i = 0; i < 24; i++) {
        HourArr.push(i + '点');
      }
      return HourArr;

    }

    // function fnSecond () {
    //
    //   var SecondArr = [];
    //   for (var i = 1; i < 60; i++) {
    //     SecondArr.push(i + '分');
    //   }
    //   return SecondArr;
    //
    // }

    var arrayy = [
      {
        scope: fnMonth()
      },
      {
        scope: fnDay()
      },
      {
        scope: fnHour()
      }];
    var data = {
      arrayy: arrayy,
      title: '',
      indexType: indexType,
      selected: indexName, //默认选中的值
      winName: winName,
      frameName: frameName,
      two: true
    };

    openFrameeeThree(data);
    return;

  } else if (indexType == 9) {
    if (indexName == '') {
      indexName = '实践';
    }
    var arrayy = valueId;
    var data = {
      arrayy: arrayy,
      title: '',
      indexType: indexType,
      selected: indexName, //默认选中的值
      winName: winName,
      frameName: frameName
    };

    openFrameee2(data);
    return;

  } else if (indexType == 10) {
    if (indexName == '') {
      indexName = '仅允许我追随的人评论';
    }
    var arrayy = [
      '任何人都可以评论',
      '仅允许我追随的人评论',
      '关闭评论'];
    var data = {
      arrayy: arrayy,
      title: '',
      indexType: indexType,
      selected: indexName, //默认选中的值
      winName: winName,
      frameName: frameName
    };

    openFrameee3(data);
    return;

  } else if (indexType == 11) {
    if (indexName == '') {
      indexName = '本科';
    }
    var arrayy = [
      '本科',
      '硕士',
      '博士'];
    var data = {
      arrayy: arrayy,
      title: '',
      indexType: indexType,
      selected: indexName, //默认选中的值
      winName: winName,
      frameName: frameName
    };

    openFrameee4(data);
    return;

  }
//所属科室
//else if(indexType==2 || indexType==3 || indexType==4){
//	var indexType1=indexType;
//	var indexName1=indexName;
//	var winName1=winName;
//	var frameName1=frameName;
//	var valueId1=valueId;
//
//	console.log(indexType1+"||"+indexName1+"||"+winName1+"||"+frameName1+"||"+valueId1)
//	getData(indexType1,indexType1, indexName1, winName1, frameName1,valueId1);
//
//
//}

}

//科室、职务、职称数据
function getData (indexType1, indexType1, indexName1, winName1, frameName1, valueId1) {
  var parame = {
    values: {
      type: indexType1,
      key: ''
    }
  };
  doAjax(GETHOSPITAL, 'POST', parame, function (data) {
    //成功执行函数
    if (data.status == '200') {
      var arrayy = [];
      var selectedArray = {};

      for (var i = 0; i < data.data.length; i++) {

        var aa = {
          value: data.data[i].name,
          id: data.data[i].assortment_id
        };

        arrayy.push(aa);
        if (valueId1 != '') {
          if (valueId1 == data.data[i].assortment_id) {
            selectedArray = aa;
          }
        } else {
          selectedArray = arrayy[0];
        }

      }

      //alert(JSON.stringify(selectedArray));
      var data = {
        arrayy: arrayy,
        title: '',
        indexType: indexType1,
        selected: selectedArray, //默认选中的值
        winName: winName1,
        frameName: frameName1
      };

      openFrameByID(data);
      return;
    } else {
      api.toast({
        msg: data.msg,
        duration: 2000,
        location: 'middle'
      });
    }
  }, function (errorData) {
    //失败执行函数
  });
}

//打开性别弹框
function openFrameee1 (data) {

  api.openFrame({
    name: 'z_tan',
    url: '../../html/main5/z_tan.html',
    rect: {
      x: 0,
      y: 0,
      w: 'auto',
      h: 'auto'
    },
    pageParam: data
  });

}

function openFrameee2 (data) {

  api.openFrame({
    name: 'z_tan1',
    url: '../../html/main5/z_tan1.html',
    rect: {
      x: 0,
      y: 0,
      w: 'auto',
      h: 'auto'
    },
    pageParam: data
  });

}

function openFrameee3 (data) {

  api.openFrame({
    name: 'z_tan1',
    url: '../../html/main5/z_tan1.html',
    rect: {
      x: 0,
      y: 0,
      w: 'auto',
      h: 'auto'
    },
    pageParam: data
  });

}

function openFrameee4 (data) {

  api.openFrame({
    name: 'z_tan1',
    url: '../html/main5/z_tan1.html',
    rect: {
      x: 0,
      y: 0,
      w: 'auto',
      h: 'auto'
    },
    pageParam: data
  });

}

function openFrameeeThree (data) {

  api.openFrame({
    name: 'z_date',
    url: 'z_date.html',
    rect: {
      x: 0,
      y: 0,
      w: 'auto',
      h: 'auto'
    },
    pageParam: data
  });

}

//打开科室弹框
function openFrameByID (data) {

  api.openFrame({
    name: 'z_tan1',
    url: '../../html/main5/z_tan1.html',
    rect: {
      x: 0,
      y: 0,
      w: 'auto',
      h: 'auto'
    },
    pageParam: data
  });

}

//打开弹框frm
function openFrameee (data) {

  api.openFrame({
    name: 'actionsheetById',
    url: '../../html/my/actionsheetById.html',
    rect: {
      x: 0,
      y: 0,
      w: 'auto',
      h: 'auto'
    },
    pageParam: data
  });

}
